﻿using MediatR;
using RBAC.MaHaiBo.API.Application.Command.UserRoleCommand;
using RBAC.MaHaiBo.Entity;
using RBAC.MaHaiBo.Service;

namespace RBAC.MaHaiBo.API.Application.CommandHandlers.UserRoleHandler
{
    public class UserRoleShowCommandHandle:IRequestHandler<UserRoleShowCommand, List<Tmeen>>
    {
        IUserRoleService urSer;

        public UserRoleShowCommandHandle(IUserRoleService urSer)
        {
            this.urSer = urSer;
        }

        public async Task<List<Tmeen>> Handle(UserRoleShowCommand request, CancellationToken cancellationToken)
        {
            return await urSer.GetUserinfo(request.Ids);
        }
    }
}
